import java.util.*;


import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.Transaction;

import com.hibernate.BeanCompteClient;
import com.hibernate.HibernateUtil;

public class MainTest {

 public static void main(String[] args)
	throws HibernateException {
	 Session session = HibernateUtil.currentSession();
	   
	 Transaction tx = session.beginTransaction();

	 BeanCompteClient contact = new BeanCompteClient();
	 contact.setLogin("dupontJ");
	 contact.setNomClient("Dupont");
	 contact.setPrenomClient("Jean");
	 contact.setAdresseClient("3 rue des Pommiers 75003 Paris");
	 contact.setMotDePasse("a1z2er3");
	 contact.seteMail("j,d@yopmail.com");
	 contact.setTelephoneFixe("0123456789");
	 contact.setTelephonePortable("0741258963");
	 contact.setNbPoints(169);
	 contact.setInfoBancaire("8456 1456 7887 9871 - 05/2012 - 875");
	 session.save(contact);

	 contact = new BeanCompteClient();
	 contact.setLogin("miss77");
	 contact.setNomClient("Lambert");
	 contact.setPrenomClient("Jully");
	 contact.setAdresseClient("3 rue des Pommiers 77250 Moret s/ Loing");
	 contact.setMotDePasse("77moret");
	 contact.seteMail("miss_77_x3@hotmail.com");
	 contact.setTelephoneFixe("0123486789");
	 contact.setTelephonePortable("0681257963");
	 contact.setInfoBancaire("");
	    
	 tx.commit();

	 HibernateUtil.closeSession();
 	}
}